package com.coocaa.app.lib.cleaner.mgr;

import android.content.Context;

import com.coocaa.app.lib.cleaner.mgr.impl.CleanerImpl;

/**
 * Created by lu on 17-4-12.
 */

public abstract class CleanerManager {

    public static final CleanerManager manager = new CleanerManager() {
        Cleaner cleaner = null;

        @Override
        public Cleaner create(Context context) {
            return new CleanerImpl(context);
        }

        @Override
        public synchronized Cleaner instance(Context context) {
            if (cleaner == null)
                cleaner = create(context);
            return cleaner;
        }
    };

    public abstract Cleaner create(Context context);

    public abstract Cleaner instance(Context context);
}
